
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
//class Dog{
//    String name;
//    int age;
//    double weight;
//
//    public void eat(){
//        System.out.println(name + "正在吃饭");
//    }
//}
//class Cat{
//    String name;
//    int age;
//    double weight;
//
//    public void eat(){
//        System.out.println(name + "正在吃饭");
//    }
//}
 class Animal {
    String name;
    int age;
    double weight;
    int a = 1;

    public void eat(){
        System.out.println(name + "正在吃饭");
    }
}
class Cat extends Animal{
    int a = 2;
    public void method(){
        System.out.println(a);
    }
}
public class Main {
    public static void main(String[] args) {
        Cat cat = new Cat();
        cat.method();
    }
}